package com.task.core.mapper;

import java.util.Date;
import java.util.List;

import com.task.core.dto.request.QuestionRequestDTO;
import com.task.core.vo.resp.QuestionShowRespVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.task.common.info.QuestionPageInfo;
import com.task.common.info.QuestionShowInfo;

/**
 * @author 迪迦.
 * @date 2025/2/11 10:26
 */
@Mapper
public interface QuestionInfoMapper {

  void insertQuestion(@Param("questionInfos") List<QuestionPageInfo> questionInfos, @Param("userId") Long userId);

  Integer fixQuestion(@Param("questionType") String questionType, @Param("dataCode") String dataCode, @Param("now") Date now, @Param("userId") Long userId);

  List<String> getDataCodes(@Param("tableName") String tableName, @Param("columnName") String columnName,
      @Param("operationCode") String operationCode);

  int checkVersionCode(@Param("tableName") String tableName, @Param("nextCode") String nextCode, @Param("versionCode") String versionCode);

  List<QuestionShowInfo> getQuestionInfosByTypeAndCode(@Param("type") String type, @Param("dataCode") String dataCode);

  List<QuestionShowInfo> getQuestionInfosByTypeAndCodes(@Param("type") String type, @Param("dataCodes") List<String> dataCodes);

  void insertQuestionByTypeIsMission(QuestionShowInfo questionShowInfo);



  QuestionShowInfo getQuestionInfosByMissionTypeAndCode(@Param("type") String type, @Param("dataCode" )String dataCode);

  void updatetQuestionByTypeIsMission(@Param("code")String code);

  List<String> getCanSeeCodes(QuestionRequestDTO questionRequestDTO);

  List<QuestionShowRespVo> getQuestionByPage(QuestionRequestDTO request);

  QuestionShowRespVo getQuestionByCode(String questionCode);

  void deleteQuestion(@Param("questionCode")String questionCode);

  void fixQuestionByCode(@Param("code") String code,@Param("questionType") String questionType, @Param("dataCode") String dataCode, @Param("now") Date now, @Param("userId") Long userId);
}
